<%@page language="java" contentType="text/html;charset=UTF-8" %>
<%@include file="../common/IncludeTop.jsp"%>  
<%@page import = "java.util.*,dao.*,domain.*" %>
<jsp:useBean id = "dao" class = "dao.ProductDao"></jsp:useBean>
<%
    String productid = request.getParameter("productid");
    Product product =(Product)dao.getProduct(productid);
    List item = new ItemDao().select("select * from item where productid='"+productid+"'");
    request.setAttribute("product",product);
    request.setAttribute("item",item);   
%>
<div id = "content">
<div id="BackLink">
<A href = "../common/Category.jsp">返回上一页</A>
</div>    
<div id = "Catalog">
<center>
<h2>${product.name }</h2>
<table>
<tr><th>项目编号</th> <th>商品编号</th> <th>说明</th> <th>价格</th> <th> </th></tr>
<c:forEach var = "obj" items = "${item }">
<tr><td><a href="Item.jsp?itemid=${obj.itemid}">${obj.itemid}</a></td><td>${obj.productid}</td><td>${obj.attr1}</td><td>&yen;${obj.listprice}</td><td><a href="Buy.jsp">添加到购物车</a></td></tr>
</c:forEach>
</center>
</table>
    </div>
</div>   
<%@include file="../common/IncludeBottom.jsp"%>

